function gabor_sim_result = gabor_sim(img, angle, pars)

%% steerable module
[ir ic] = size(img) ;
 

    
    kx = 2069*cos(angle)/5000;
 	ky = 2069*sin(angle)/5000;
    
    reMod = zeros(ir,ic);
    imMod = zeros(ir,ic);
            
     i=1;
     j=1;
     
     
      for row = -ir/2 : 1 : ((ir/2)-1) %((ic/2)-1) : -1 : -ic/2
        for column = -ic/2 : 1 : ((ic/2)-1)
                   
             
            sin_arg_o = sin(column*kx)*cos(row*ky) + cos(column*kx)*sin(row*ky); 
           
			cos_arg_o = cos(column*kx)*cos(row*ky) - sin(column*kx)*sin(row*ky) ; 
                        
            reMod(i,j) =  cos_arg_o ;
            imMod(i,j) =  sin_arg_o ;
            j=j+1 ;
            
            if (j==(ir+1))
                j=1;
                i=i+1 ;
            end        
                        
        end
      end
	  
	  reimg = reMod.*img ;
	  imimg = imMod.*img ;
      
      
      
      
      %% low pass filter	  	
		
    filt_coeff_2d = pars.resample_filt_coeff;

			array_in_re = double(reimg);
			array_in_im = double(imimg);
			conv_result_2d_re = conv2(array_in_re, filt_coeff_2d, 'same');  
			conv_result_2d_im = conv2(array_in_im, filt_coeff_2d, 'same');  
            
        %% absolute

	  
	  reimg2 = conv_result_2d_re.*conv_result_2d_re ;
	  imimg2 = conv_result_2d_im.*conv_result_2d_im ;
      gabor_sim_result = sqrt(reimg2+imimg2);     
      
     